package com.efast.cafe.portal.service.statemach;

import java.util.List;

import com.efast.cafe.commponent.statemach.bean.StateMachByRoleBean;
import com.efast.cafe.portal.bean.statemach.PortalStateMachState;
import com.efast.cafe.portal.bean.statemach.PortalStateMachStateBean;
import com.efast.cafe.portal.bean.statemach.PortalStateMachStateConf;
import com.efast.cafe.portal.bean.statemach.PortalStateMachStateQueryBean;
import com.efast.cafe.portal.entity.company.PortalCompanyRole;
import com.efast.cafe.portal.remote.statemach.PortalStateMachStateService;

public interface IPortalStateMachStateService extends PortalStateMachStateService {

	/**
	 * 新增状态
	 * 
	 * @param state
	 */
	public Long insertState(PortalStateMachState state);

	/**
	 * 新增状态配置
	 * 
	 * @param stateConf
	 */
	public void insertStateConf(PortalStateMachStateConf stateConf);

	/**
	 * 替换状态配置
	 * 
	 * @param stateConf
	 */
	public void replaceStateConf(PortalStateMachStateConf stateConf);

	/**
	 * 修改状态
	 * 
	 * @param state
	 */
	public void updateState(PortalStateMachState state);

	/**
	 * 删除状态
	 * 
	 * @param stateId
	 */
	public void deleteState(PortalStateMachState state);

	/**
	 * 获取状态机状态列表带分页
	 * 
	 * @param queryBean
	 * @return
	 */
	public PortalStateMachStateQueryBean queryPageStateMachState(PortalStateMachStateQueryBean queryBean);

	public List<PortalStateMachStateBean> getPortalStateMachStateBeanByConfId(Long ConfId);

	/**
	 * 根据角色获取可处理的状态
	 * 
	 * @param roles
	 * @param companyCode
	 * @return
	 */
	List<StateMachByRoleBean> getPortalStateMachStateByRole(List<PortalCompanyRole> roles, String companyCode);

	/**
	 * 管理员获取可处理的状态
	 * 
	 * @param companyCode
	 * @return
	 */
	List<StateMachByRoleBean> getPortalStateMachStateByRoleForAdmin(String companyCode);

	/**
	 * 根据企业名获取状态
	 * 
	 * @param companyCode
	 * @return
	 */
	List<PortalStateMachStateBean> getPortalStateMachStateByCompanyCode(String companyCode);

	/**
	 * 根据企业名获取可配置状态
	 * 
	 * @param companyCode
	 * @return
	 */
	List<PortalStateMachState> queryCanConfigStateByCompanyCode(String companyCode);
}
